import App from './App'
import { createSSRApp } from 'vue'
import uviewPlus from '@/uni_modules/uview-plus'
import pinia from '@/store'
import CustomNavigation from '@/components/CustomNavigation/CustomNavigation.vue'
import CommonTitle from '@/components/CommonTitle/CommonTitle.vue'

// 注册全局组件
const registerAppComponent = (app) => {
	app.component('CustomNavigation', CustomNavigation)
	app.component('CommonTitle', CommonTitle)
}

export function createApp() {
  const app = createSSRApp(App)
	 app.use(uviewPlus)
	 app.use(pinia);
	 registerAppComponent(app)
	
  return {
    app
  }
}
